<?php
/*
 * @Author: 莫莫
 * @Phone: 13450159681
 * @Description: 
 * @Date: 2024-08-10 16:26:43
 * @LastEditTime: 2024-08-10 17:02:10
 */
// $hostname = '47.115.73.239';
// $dbname = 'S7_20240624_ZHISHUISHANGYUAN';
// $username = 'sa';
// $password = 'zssy#123';
$serverName = "47.115.73.239"; // MSSQL服务器名称或IP地址  
$connectionOptions = array(
    "Database" => "S7_20240624_ZHISHUISHANGYUAN", // 数据库名称  
    "Uid"=> "sa", // 数据库用户名  
    "PWD"=> "zssy#123" // 数据库密码  
    );
// 建立连接  
$conn = sqlsrv_connect($serverName, $connectionOptions);
if ($conn === false) {
    die(print_r(sqlsrv_errors(), true));
}

